package com.gitee.shigen.security.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * jwt的配置
 *
 * @author shigenfu
 * @date 2024/1/31 15:28
 */
@Component
@Configuration
@ConfigurationProperties(prefix = "jwt")
@Data
public class JwtConfig {

    /**
     * jwt 加密 key，默认值：shigen
     */
    private String key = "shigen";

    /**
     * jwt 过期时间，默认值：600000 {@code 10 分钟}.
     */
    private Long expireTime = 600000L;

    /**
     * 开启 记住我 之后 jwt 过期时间，默认值 604800000 {@code 7 天}
     */
    private Long rememberMeTime = 604800000L;

    /**
     * 接口白名单
     */
    private List<String> ignoreUrl;

}
